package com.qianxun.module.datasource2.test.rest;


import com.qianxun.module.base.constant.Result;
import com.qianxun.module.datasource2.test.entity.User;
import com.qianxun.module.datasource2.test.service.UserService;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;


import javax.annotation.Resource;
import java.util.List;


/**
* com.crm.module.datasource1.test.entity.User模型http接口处理
*
* @author: admin
* @date: 2020-02-24
* @version: 1.0.0
*/
@RestController
@RequestMapping(value="/test/user" ,produces = {MediaType.APPLICATION_JSON_UTF8_VALUE})
public class UserRestController {

    @Resource
    private UserService baseService;

    @RequestMapping(value = {"/search/all"})
    public Result searchAll() {
        List<User> list = baseService.list();
        return Result.success(list);
    }
}
